package com.tmindtech.api.enterprise.db

import com.tmindtech.api.enterprise.model.ProductCheck
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import tk.mybatis.mapper.common.Mapper
import java.util.*

/**
 * Created by RexQian on 2017/12/1.
 */
interface ProductCheckMapper : Mapper<ProductCheck> {
    @Select("SELECT * FROM t_product_check WHERE enterprise_id = \${enterprise_id} AND check_result = 1 AND check_date >= #{start_time} AND check_date < #{end_time}")
    fun selectByCondition(@Param("enterprise_id") enterpriseId: Long,
                          @Param("start_time") startTime: Date,
                          @Param("end_time") endTime: Date): List<ProductCheck>
}
